<%--
  Created by IntelliJ IDEA.
  User: Teacher
  Date: 2023/11/23
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<h4>部门列表</h4>
<table class="table table-bordered table-hover">
    <thead class="table-dark">
        <tr>
            <td>序号</td>
            <td>部门编号</td>
            <td>部门名称</td>
            <td>部门所在地</td>
            <td>操作</td>
        </tr>
    </thead>
    <tbody>
        <c:forEach items="${depts}" var="dept" varStatus="status">
            <tr>
                <td>${ status.count }</td>
                <td>${ dept.deptno }</td>
                <td>${ dept.dname }</td>
                <td>${ dept.loc }</td>
                <td>
<%--                    <input type="button" value="详情">--%>
                    <a href="${pageContext.request.contextPath}/dept/get?deptno=${dept.deptno}" class="btn btn-info btn-sm">详情</a>
                    <input class="btn btn-primary btn-sm" type="button" value="添加">
                    <input class="btn btn-warning btn-sm" type="button" value="修改">
                    <input class="btn btn-danger btn-sm" type="button" value="删除">
                </td>
            </tr>
        </c:forEach>
    </tbody>
</table>
